<template>
  <div>
    <h1>Parent</h1>
    <Child :count="count" @update:count="count = $event" />
    <hr>
    <h2>使用.sync修饰符 进行父子组件双向绑定</h2>
    <Child :count.sync="count"  />


  </div>
</template>

<script>
import Child from "./Child";
export default {
  name: "Parent",
  components: {
    Child,
  },
  data() {
    return {
      count: 0,
    };
  },
};
</script>

<style>
</style>